package com.wmm.fast.main.shop2State;

import lombok.extern.slf4j.Slf4j;

/**
 * @Auther: wangzun
 * @Date: 2018/9/13 16:29
 * @Description:
 */
@Slf4j
public class ConcreteStateB implements State{
    @Override
    public void handler(Context context) {
        if(context.getCount() == 2) {
            log.info("执行完了当前B状态应有的逻辑.切换状态");
        }
        context.state = new ConcreteStateA();//设置当前实例的下一状态为A
    }
}
